import { axios } from '@/utils/request'

const api = {
  psBlogNode: '/blog/node'
}

export function getPsBlogNodeList (parameter) {
  return axios({
    url: api.psBlogNode + '/list',
    method: 'get',
    params: parameter
  })
}

export function savePsBlogNode (parameter) {
  return axios({
    url: api.psBlogNode + (parameter.nodeId > 0 ? '/update' : '/save'),
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

export function delPsBlogNode (parameter) {
  return axios({
    url: api.psBlogNode + '/remove',
    method: 'post',
    params: parameter
  })
}

export const psBlogNodeExport = api.psBlogNode + '/export'
